package com.kabuda.blog.utils;

import com.kabuda.blog.dao.pojo.SysUser;

/**
 * @author kabuda
 * @create 2023-01-17 18:08
 */
public class UserThreadLocal {
    //私有空参构造器，不需要被new
    private UserThreadLocal(){
    }

    public static final ThreadLocal<SysUser> LOCAL=new ThreadLocal<>();

    public static void set(SysUser sysUser){
        LOCAL.set(sysUser);
    }
    public static SysUser get( ){
        return LOCAL.get();
    }
    public static void remove(){
        LOCAL.remove();
    }



}
